/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package autootje;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author frankkie
 */
public class StartScherm extends JPanel {

  public StartScherm() {
    this.setLayout(new BorderLayout());
    this.add(new JLabel(Main.progNaam), BorderLayout.NORTH);
    JPanel paneeltje = new JPanel();
    GridLayout lay = new GridLayout();
    lay.setColumns(1);
    lay.setRows(0);
    paneeltje.setLayout(lay);
    JButton startKnop = new JButton("Start Game");
    startKnop.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {
        if (Main.debug){
          Main.drukaf("Op de 'Start Game' knop Getklikt (in StartScherm)");
        }
        Main.showPane(Main.GAME_PANEL);
        //throw new UnsupportedOperationException("Not supported yet.");
      }
    });
    paneeltje.add(startKnop);
    JButton exitKnop = new JButton("Exit");
    exitKnop.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {
        Main.drukaf("Op de Exit-Knop geklikt (in StartScherm)");
        System.exit(0);
        //throw new UnsupportedOperationException("Not supported yet.");
      }
    });
    paneeltje.add(exitKnop);
    this.add(paneeltje, BorderLayout.CENTER);
  }
}
